<html xmlns="http://www.w3.org/1999/xhtml">
<head id="pageHead">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Dojo Campus - Feature Explorer</title>
    <link rel="alternate" type="application/atom+xml" title="DojoCampus latest demos" href="featureexplorer/latestDemos.xml" />
    <!--  CSS includes -->
    <link href="/assets/js/dojo-release-1.1.0/dijit/themes/nihilo/nihilo.css" rel="stylesheet" type="text/css" />       
    <link href="/assets/js/dojo-release-1.1.0/dojo/resources/dojo.css" rel="stylesheet" type="text/css" />
    
    <style type="text/css">
        
        @import "/assets/js/dojo-release-1.1.0/dojox/highlight/resources/highlight.css";
        @import "/assets/js/dojo-release-1.1.0/dojox/highlight/resources/pygments/default.css";
        @import "/assets/js/dojo-release-1.1.0/dojo/resources/dojo.css";       
    </style>
    <style type="text/css">
        @import "/assets/js/dojo-release-1.1.0/dojox/grid/_grid/Grid.css";
        @import "/assets/js/dojo-release-1.1.0/dojox/grid/_grid/nihiloGrid.css";
    </style>
    <style type="text/css" id="generatedStyles"></style>
    
    <!-- dojo / requires -->
    <script type="text/javascript" src="/assets/js/dojo-release-1.1.0/dojo/dojo.js"
      djConfig="parseOnLoad: true"></script>
      
    <script type="text/javascript">
        dojo.require("dojo.io.iframe"); 
        dojo.require("dijit.ProgressBar"); 
        dojo.require("dijit.form.DateTextBox");
        dojo.require("dijit.form.Button");
        dojo.require("dijit.form.TextBox");
        dojo.require("dojo.parser");
        
        // it's all wrapped up in a single function
        function sendForm(){

          //Hide the file input field
          dojo.style('inputField',"display","none");
          
          //Show the progress bar
          dojo.style('progressField',"display","inline"); 
          dojo.byId('preamble').innerHTML = "Uploading ..."; 

          dojo.io.iframe.send({
            url: "file_upload_script.php",
            method: "post",
            handleAs: "text",
            form: dojo.byId('mainForm'),
            handle: function(data,ioArgs){
              var foo = dojo.fromJson(data);
              if (foo.status == "success"){
                //Show the file input field
                dojo.style(dojo.byId('inputField'),"display","inline");
                dojo.byId('fileInput').value = '';
                
                //Hide the progress bar
                dojo.style(dojo.byId('progressField'),"display","none"); 
                dojo.byId('uploadedFiles').innerHTML += "OK: File: " + foo.details.name 
                  + " size: " + foo.details.size +"<br>"; 
                dojo.byId('preamble').innerHTML = "Bestand om op te laden: ";       
              }else{
                dojo.style(dojo.byId('inputField'),"display","inline");
                dojo.style(dojo.byId('progressField'),"display","none"); 
                dojo.byId('preamble').innerHTML = "Fout, probeer opnieuw: "; 
              }  
            }
          });
        }  
    </script>
    

</head>
<body class="nihilo">

<table align="left" cellspacing="2">
                                            <tr>
                                                <td><strong>Naam tornooi</strong></td>
                                                <td><input id="name" type="text" name="firstname"
                                                    style="width: 300px;" 
                                                    dojoType="dijit.form.TextBox" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td><strong>Datum</strong></td>
                                                <td><input dojoType="dijit.form.DateTextBox" 
                                                    type="text" id="date" name="noDOMvalue" >
                                                </td>
                                            </tr>
                                        </table>
